package orgInfo

import (
	"fmt"
	"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/msp"
	"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk"
)

// 管理员MSP客户端的操作
// 暂无

// GetSigningIdentity 获取该组织管理员用户的签名
func (o *OrgInfo) GetSigningIdentity(fabSDK *fabsdk.FabricSDK) (*msp.SigningIdentity, error) {
	// 获取Msp客户端
	mspClient, err := o.CreatMSPClient(fabSDK, o.AdminUser)
	if err != nil {
		return nil, fmt.Errorf("GetSigningIdentity err:%v", err)
	}
	// 获取签名
	orgSignId, err := mspClient.GetSigningIdentity(o.AdminUser)
	if err != nil {
		return nil, fmt.Errorf("GetSigningIdentity err:%v", err)
	}
	return &orgSignId, nil
}
